projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7aa32ad
)
fix bugs in addhms.
author
tsteven4
<tsteven4@gmail.com>
Sun, 13 Apr 2014 13:26:17 +0000
(13:26 +0000)
committer
tsteven4
<tsteven4@gmail.com>
Sun, 13 Apr 2014 13:26:17 +0000
(13:26 +0000)
gpsbabel/csv_util.cc
patch
|
blob
|
history
diff --git
a/gpsbabel/csv_util.cc
b/gpsbabel/csv_util.cc
index df44a5cc942f3f6ac04e182daa3a29dced855c58..c597efa1faa8b20863d7a5b4bf80826183189226 100644
(file)
--- a/
gpsbabel/csv_util.cc
+++ b/
gpsbabel/csv_util.cc
@@
-868,13
+868,13
@@
addhms(const char* s, const char* format)
int ac;
ampm = (char*) xmalloc(strlen(s) + 1);
- ac = sscanf(s, format, &hour, &min, &sec,
&
ampm);
+ ac = sscanf(s, format, &hour, &min, &sec, ampm);
/* If no time format in arg string, assume AM */
if (ac < 4) {
ampm[0] = 0;
}
if (ac) {
- tt = ((tolower(ampm[0])=='
P
')?43200:0)+3600*hour+60*min+sec;
+ tt = ((tolower(ampm[0])=='
p
')?43200:0)+3600*hour+60*min+sec;
}
xfree(ampm);